package com.examples.demo2;

import com.google.inject.Guice;
import com.google.inject.Inject;

/**
 * 注入静态字段
 */
public class StaticFieldInjectDemo {
    @Inject
    private static Service service;

    public static void main(String[] args) {
        Guice.createInjector((binder)->{
            binder.requestStaticInjection(StaticFieldInjectDemo.class);
                }
        );
        StaticFieldInjectDemo.service.execute();
    }
}
